<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<title>Castle IOC容器快速入门 - TerryLee's Tech Space - 博客园</title>
<meta name="keywords" content="09,依赖注入,12,开源世界,Castle,IOC容器快速入门">
<meta name="description" content="IOC模式是近年来非常流行的一种模式，相信大家都不陌生了，如果你还不是很熟悉的话，可以看看Martin Fowler大师的文章http://martinfowler.com/articles/injection.html，网上可以下载到中文版本。在Castle中，Windsor就是它的一个IOC容器，它构建于MicroKernel之上，功能非常强大。本文将通过一个简单的例子来带你快速走进Castle IOC容器。主要内容1．为什么要IOC2．什么是Castle IOC容器3．快速入门示例4．几个重要的概念">




<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/Terrylee/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/Terrylee/rsd.xml"> 
  



<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head>
<body>
    <form name="Form1" method="post" action="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html" id="Form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>




        <link rel="shortcut icon" href="blogengine.ico">
<!--done-->
<div id="home">
<div id="header">
	<div id="blogTitle">
	<a id="lnkBlogLogo" href="http://www.cnblogs.com/Terrylee/"><img id="blogLogo" src="logo.gif" alt="返回主页"></a>			
		
<!--done-->
<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/Terrylee/">TerryLee's Tech Space</a></h1>
<h2>TerryLee技术专栏</h2>



		
	</div><!--end: blogTitle 博客的标题和副标题 -->
	<div id="navigator">
		
<!--done-->
			<ul id="navList">
				<li><a id="MyLinks1_HomeLink" class="menu" href="http://www.cnblogs.com/">博客园</a></li>
				<li><a id="MyLinks1_SpaceLink" class="menu" href="http://space.cnblogs.com/">社区</a></li>
				<li><a id="MyLinks1_MyHomeLink" class="menu" href="http://www.cnblogs.com/Terrylee/">首页</a></li>
				<li><a id="MyLinks1_NewPostLink" class="menu" href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx?opt=1">新随笔</a></li>
				<li><a id="MyLinks1_ContactLink" accesskey="9" class="menu" href="http://space.cnblogs.com/msg/send/TerryLee">联系</a></li>
				<li><a id="MyLinks1_Admin" class="menu" href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx">管理</a></li>
				<li><a id="MyLinks1_Syndication" class="menu" href="http://www.cnblogs.com/Terrylee/rss">订阅</a>
				<a id="MyLinks1_XMLLink" class="aHeaderXML" href="http://www.cnblogs.com/Terrylee/rss"><img src="rss.gif" alt="订阅" style="border-width: 0px;"></a></li>
			</ul>


		<div class="blogStats">
			
			
<!--done-->
随笔- 491&nbsp;
文章- 3&nbsp;
评论- 15367&nbsp;

			
		</div><!--end: blogStats -->
	</div><!--end: navigator 博客导航栏 -->
</div><!--end: header 头部 -->

<div id="main">
	<div id="mainContent">
	<div class="forFlow">
		
					
<!--done-->
<div id="topics">
	<div class="post">
		<h1 class="postTitle">
			<a id="ctl04_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/Terrylee/archive/2006/04/17/377018.html">Castle IOC容器快速入门</a>
		</h1>
		<div class="clear"></div>
		<div class="postBody">
			<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">摘要：<span lang="EN-US">IOC</span>模式是近年来非常流行的一种模式，相信大家都不陌生了，如果你还不是很熟悉的话，可以看看<span lang="EN-US">Martin Fowler</span>大师的文章<span style="color: rgb(51, 102, 255);" lang="EN-US"><a href="http://martinfowler.com/articles/injection.html"><span style="color: rgb(51, 102, 255); text-decoration: none;">http://martinfowler.com/articles/injection.html</span></a></span>，网上可以下载到中文版本。在<span lang="EN-US">Castle</span>中，</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Windsor</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">就是它的一个<span lang="EN-US">IOC</span>容器，它构建于<span lang="EN-US">MicroKernel</span>之上，功能非常强大。本文将通过一个简单的例子来带你快速走进<span lang="EN-US">Castle IOC</span>容器。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">主要内容<span lang="EN-US"><o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">1</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．为什么要<span lang="EN-US">IOC<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">2</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．什么是<span lang="EN-US">Castle IOC</span>容器<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">3</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．快速入门示例<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">4</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．几个重要的概念<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">一，为什么要<span lang="EN-US">IOC<o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">IOC</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">（控制反转或者叫依赖注入）<span lang="EN-US">Martin Fowler</span></span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">大师在他的文章中已经讲解的非常精彩了，这里实在不敢班门弄斧，只好简单地解释几句。我们使用</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">抽象接口来隔离使用者和具体实现之间的依赖关系，但是不管再怎么抽象，最终还是要创建具体实现类的实例，这种创建具体实现类的实例对象就会造成对于具体实现的依赖，为了消除这种创建依赖性，需要把依赖移出到程序的外部（比如配置文件）。使用依赖注入后，这些类完全是基于抽象接口编写而成的，所以可以最大限度地适应需求的变化。依赖注入的形式有三种，分别为构造子注入（<span lang="EN-US">Constructor Injection</span>）、设值方法注入（<span lang="EN-US">Setter Injection</span>）和接口注入（<span lang="EN-US">Interface Injection</span>）。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">二．什么是<span lang="EN-US">Castle IOC</span>容器<span lang="EN-US"><o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Windsor</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">是<span lang="EN-US">Castle </span>的一个<span lang="EN-US">IOC</span>容器。它构建于<span lang="EN-US">MicroKernel</span>之上，功能非常之强大，能检测类并了解使用这些类时需要什么参数，检测类型和类型之间工作依赖性，并提供服务或者发生错误时提供预警的机制。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">三．快速入门示例<span lang="EN-US"><o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">现在假如我们有这样一个需求，开发一个日志组件，把日志信息输出到文本文件，同时对输出的信息进行格式化，以示意性的代码来实现。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">1</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．新建一个<span lang="EN-US">C#</span>工程，添加对以下<span lang="EN-US">Dll</span>的引用<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle.DynamicProxy.dll<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle.MicroKernel.dll<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle.Model.dll<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle.Windsor.dll<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">2</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．编写服务<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">既然是日志组件，我们先添加两个接口分别为</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">ILog</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">和<span lang="EN-US">ILogFormatter</span>，这样的接口我们一般叫做服务，即实现了某种服务的接口（后面会讲到）。</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p></o:p></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_82_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_82_Open_Text.style.display='none'; Codehighlighter1_0_82_Closed_Image.style.display='inline'; Codehighlighter1_0_82_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_82_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_82_Closed_Text.style.display='none'; Codehighlighter1_0_82_Open_Image.style.display='inline'; Codehighlighter1_0_82_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_82_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_82_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;编写：Terrylee<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;出处：</span><span style="color: rgb(0, 128, 0); text-decoration: underline;"><span><a href="http://terrylee.cnblogs.com/" class="smarterwiki-linkify">http://terrylee.cnblogs.com</a></span></span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">interface</span><span style="color: rgb(0, 0, 0);">&nbsp;ILog<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_107_142_Open_Image" onclick="this.style.display='none'; Codehighlighter1_107_142_Open_Text.style.display='none'; Codehighlighter1_107_142_Closed_Image.style.display='inline'; Codehighlighter1_107_142_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_107_142_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_107_142_Closed_Text.style.display='none'; Codehighlighter1_107_142_Open_Image.style.display='inline'; Codehighlighter1_107_142_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_107_142_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_107_142_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Write(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;MsgStr);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;">&nbsp;<span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_82_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_82_Open_Text.style.display='none'; Codehighlighter1_0_82_Closed_Image.style.display='inline'; Codehighlighter1_0_82_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_82_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_82_Closed_Text.style.display='none'; Codehighlighter1_0_82_Open_Image.style.display='inline'; Codehighlighter1_0_82_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_82_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_82_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;编写：Terrylee<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;出处：</span><span style="color: rgb(0, 128, 0); text-decoration: underline;"><span><a href="http://terrylee.cnblogs.com/" class="smarterwiki-linkify">http://terrylee.cnblogs.com</a></span></span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">interface</span><span style="color: rgb(0, 0, 0);">&nbsp;ILogFormatter<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_116_154_Open_Image" onclick="this.style.display='none'; Codehighlighter1_116_154_Open_Text.style.display='none'; Codehighlighter1_116_154_Closed_Image.style.display='inline'; Codehighlighter1_116_154_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_116_154_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_116_154_Closed_Text.style.display='none'; Codehighlighter1_116_154_Open_Image.style.display='inline'; Codehighlighter1_116_154_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_116_154_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_116_154_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Format(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;MsgStr);<br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left"><br>3<span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．编写组件<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">仅仅有接口还不行，还需要实现了上面两个接口的具体实现类，这些类我们把它叫做组件。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p></o:p></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_82_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_82_Open_Text.style.display='none'; Codehighlighter1_0_82_Closed_Image.style.display='inline'; Codehighlighter1_0_82_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_82_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_82_Closed_Text.style.display='none'; Codehighlighter1_0_82_Open_Image.style.display='inline'; Codehighlighter1_0_82_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_82_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_82_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;编写：Terrylee<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;出处：</span><span style="color: rgb(0, 128, 0); text-decoration: underline;"><span><a href="http://terrylee.cnblogs.com/" class="smarterwiki-linkify">http://terrylee.cnblogs.com</a></span></span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;TextFileLog&nbsp;:&nbsp;ILog<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_117_543_Open_Image" onclick="this.style.display='none'; Codehighlighter1_117_543_Open_Text.style.display='none'; Codehighlighter1_117_543_Closed_Image.style.display='inline'; Codehighlighter1_117_543_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_117_543_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_117_543_Closed_Text.style.display='none'; Codehighlighter1_117_543_Open_Image.style.display='inline'; Codehighlighter1_117_543_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_117_543_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_117_543_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_target;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;ILogFormatter&nbsp;_format;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;TextFileLog(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;target,ILogFormatter&nbsp;format)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_252_323_Open_Image" onclick="this.style.display='none'; Codehighlighter1_252_323_Open_Text.style.display='none'; Codehighlighter1_252_323_Closed_Image.style.display='inline'; Codehighlighter1_252_323_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_252_323_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_252_323_Closed_Text.style.display='none'; Codehighlighter1_252_323_Open_Image.style.display='inline'; Codehighlighter1_252_323_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_252_323_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_252_323_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._target&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;target;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._format&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;format;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Write(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;MsgStr)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_371_540_Open_Image" onclick="this.style.display='none'; Codehighlighter1_371_540_Open_Text.style.display='none'; Codehighlighter1_371_540_Closed_Image.style.display='inline'; Codehighlighter1_371_540_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_371_540_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_371_540_Closed_Text.style.display='none'; Codehighlighter1_371_540_Open_Image.style.display='inline'; Codehighlighter1_371_540_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_371_540_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_371_540_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;_MsgStr&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;_format.Format(MsgStr);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_MsgStr&nbsp;</span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);">&nbsp;_target;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">Output&nbsp;Message</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Output&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">_MsgStr);<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;">&nbsp;<span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_82_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_82_Open_Text.style.display='none'; Codehighlighter1_0_82_Closed_Image.style.display='inline'; Codehighlighter1_0_82_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_82_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_82_Closed_Text.style.display='none'; Codehighlighter1_0_82_Open_Image.style.display='inline'; Codehighlighter1_0_82_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_82_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_82_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;编写：Terrylee<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;出处：</span><span style="color: rgb(0, 128, 0); text-decoration: underline;"><span><a href="http://terrylee.cnblogs.com/" class="smarterwiki-linkify">http://terrylee.cnblogs.com</a></span></span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;TextFormatter&nbsp;:&nbsp;ILogFormatter<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_128_277_Open_Image" onclick="this.style.display='none'; Codehighlighter1_128_277_Open_Text.style.display='none'; Codehighlighter1_128_277_Closed_Image.style.display='inline'; Codehighlighter1_128_277_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_128_277_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_128_277_Closed_Text.style.display='none'; Codehighlighter1_128_277_Open_Image.style.display='inline'; Codehighlighter1_128_277_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_128_277_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_128_277_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;TextFormatter()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_163_180_Open_Image" onclick="this.style.display='none'; Codehighlighter1_163_180_Open_Text.style.display='none'; Codehighlighter1_163_180_Closed_Image.style.display='inline'; Codehighlighter1_163_180_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_163_180_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_163_180_Closed_Text.style.display='none'; Codehighlighter1_163_180_Open_Image.style.display='inline'; Codehighlighter1_163_180_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_163_180_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_163_180_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;Format(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;MsgStr)<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_231_274_Open_Image" onclick="this.style.display='none'; Codehighlighter1_231_274_Open_Text.style.display='none'; Codehighlighter1_231_274_Closed_Image.style.display='inline'; Codehighlighter1_231_274_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_231_274_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_231_274_Closed_Text.style.display='none'; Codehighlighter1_231_274_Open_Image.style.display='inline'; Codehighlighter1_231_274_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_231_274_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_231_274_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;MsgStr&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left"><br>4<span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．编写配置文件</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">编写配置文件，由于</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">TextFileLog</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">构造函数中除了需要一个<span lang="EN-US">ILogFormatter</span>的实例之外，还需要指定信息的输出的文本文件名，所以编写一个配置文件来指定，这个也可以放在应用程序配置文件中（<span lang="EN-US">Web.config</span>或者<span lang="EN-US">App.config</span>）。</span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 255);">&lt;?</span><span style="color: rgb(255, 0, 255);">xml&nbsp;version="1.0"&nbsp;encoding="utf-8"&nbsp;</span><span style="color: rgb(0, 0, 255);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">configuration</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">components</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">component&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="txtLog"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameters</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">target</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">log.txt</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">target</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">parameters</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">component</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">components</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">configuration</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">5</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．使用<span lang="EN-US">Castle IOC</span>容器<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">前面的几步仅仅是为我们<span lang="EN-US">Castle IOC</span>做准备，下面就是正式使用了。使用<span lang="EN-US">Castle IOC</span>容器非常简单，基本上分为建立容器，加入组件，获取组件，使用组件几个步骤。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left">&nbsp;</p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img id="Codehighlighter1_0_82_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_82_Open_Text.style.display='none'; Codehighlighter1_0_82_Closed_Image.style.display='inline'; Codehighlighter1_0_82_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_0_82_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_0_82_Closed_Text.style.display='none'; Codehighlighter1_0_82_Open_Image.style.display='inline'; Codehighlighter1_0_82_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"><span id="Codehighlighter1_0_82_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);">/**/</span><span id="Codehighlighter1_0_82_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;编写：Terrylee<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;出处：</span><span style="color: rgb(0, 128, 0); text-decoration: underline;"><span><a href="http://terrylee.cnblogs.com/" class="smarterwiki-linkify">http://terrylee.cnblogs.com</a></span></span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top"></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"></span></span><br><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);"><br><img src="none.gif" align="top"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;App<br><img src="none.gif" align="top"><br><img id="Codehighlighter1_102_671_Open_Image" onclick="this.style.display='none'; Codehighlighter1_102_671_Open_Text.style.display='none'; Codehighlighter1_102_671_Closed_Image.style.display='inline'; Codehighlighter1_102_671_Closed_Text.style.display='inline';" src="expandedblockstart.gif" align="top"><img id="Codehighlighter1_102_671_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_102_671_Closed_Text.style.display='none'; Codehighlighter1_102_671_Open_Image.style.display='inline'; Codehighlighter1_102_671_Open_Text.style.display='inline';" src="contractedblock.gif" align="top"></span><span id="Codehighlighter1_102_671_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_102_671_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Main()<br><img src="inblock.gif" align="top"><br><img id="Codehighlighter1_140_668_Open_Image" onclick="this.style.display='none'; Codehighlighter1_140_668_Open_Text.style.display='none'; Codehighlighter1_140_668_Closed_Image.style.display='inline'; Codehighlighter1_140_668_Closed_Text.style.display='inline';" src="expandedsubblockstart.gif" align="top"><img id="Codehighlighter1_140_668_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_140_668_Closed_Text.style.display='none'; Codehighlighter1_140_668_Open_Image.style.display='inline'; Codehighlighter1_140_668_Open_Text.style.display='inline';" src="contractedsubblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="Codehighlighter1_140_668_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="dot.gif"></span><span id="Codehighlighter1_140_668_Open_Text"><span style="color: rgb(0, 0, 0);">{<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">建立容器</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IWindsorContainer&nbsp;container&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;WindsorContainer(&nbsp;</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;XmlInterpreter(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><span><a href="http://www.cnblogs.com/BasicUsage.xml" class="smarterwiki-linkify">http://www.cnblogs.com/BasicUsage.xml</a></span></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">加入组件</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;container.AddComponent(&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">txtLog</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(ILog),&nbsp;</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(TextFileLog)&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;container.AddComponent(&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">format</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(ILogFormatter),&nbsp;</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(TextFormatter)&nbsp;);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">获取组件</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ILog&nbsp;log&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;(ILog)&nbsp;container[</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">txtLog</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">];<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">使用组件</span><span style="color: rgb(0, 128, 0);"><br><img src="inblock.gif" align="top"></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.Write(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">First&nbsp;Castle&nbsp;IOC&nbsp;Demo</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="inblock.gif" align="top"><br><img src="inblock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.ReadLine();<br><img src="inblock.gif" align="top"><br><img src="expandedsubblockend.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"><br><img src="inblock.gif" align="top"><br><img src="expandedblockend.gif" align="top">}</span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%; text-align: left;" align="left"></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">简单的描述一下：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">第一步：注册了一个<span lang="EN-US">Windsor</span>容器；<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">第二步：向容器中注册<span lang="EN-US">ILog</span>服务，并告诉容器<span lang="EN-US">TextFileLog</span>实现了这个服务，这里还设置了一个<span lang="EN-US">key</span>的参数，后面可以通过这个参数来获取这个服务，注册<span lang="EN-US">ILog</span>时容器会发现这个服务依赖于其他的服务，它会自动去寻找，如果找不到这样的服务，则会抛出一个异常；<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">第三步：向容器中注册<span lang="EN-US">ILogFormatter</span>并告知<span lang="EN-US">TextFormatter</span>实现了它；<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">第四步：容器发现类的构造函数还需要另外一个参数<span lang="EN-US">target</span>，这里指定了到<span lang="EN-US">BasicUsage.xml</span>中去查找。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">运行程序，可以看到输出的结果：</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p></o:p></span></p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="none.gif" align="top"><span style="color: rgb(0, 0, 0);">Output&nbsp;[First&nbsp;Castle&nbsp;IOC&nbsp;Demo]log.txt</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">怎么样？够简单的吧。</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">可以看到整个过程非常的简单，代码也非常优雅，我们并没有使用<span lang="EN-US">new</span>关键字创建一个具体实现类的实例，</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">至此，一个简单的使用<span lang="EN-US">Castle IOC</span>的过程就完成了。下面我们来理解一下其中几个重要的概念。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">四．几个重要的概念<span lang="EN-US"><o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">1</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．服务<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">服务是一个个的接口，接口约定了服务，从而使随意替换服务的实现对使用接口服务的代码没有任何的影响。像我们上面例子中的<span lang="EN-US">ILog</span>，<span lang="EN-US">ILogFormatter</span>都是一个个服务，我们在这个例子中支实现了一个文本文件的日志记录，如果你要是实现数据库记录的日志记录，都必须要遵守<span lang="EN-US">ILog</span>这个接口。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">2</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．组件<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">简单来说组件是一个可重用的程序单元，它实现了某个接口，并仅仅只实现了这一个良好的接口。也就是说，组件是实现了某个服务接口的类。像上例中的</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">TextFileLog</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">，<span lang="EN-US">TextFormatter</span>都是组件<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">3</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">．自动装配<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">在上面的例子中，大家可能都已经注意到了，<span lang="EN-US">TextFileLog</span>依赖于<span lang="EN-US">TextFormatter</span>，我们却没有在配置文件中指定它们之间的依赖关系，这就是<span lang="EN-US">Castle IOC</span>聪明的一个地方，它能够自动管理组件之间的依赖关系，而无需编写特定的<span lang="EN-US">xml config</span>来配置，即自动装配的意思。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle IOC</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">容器快速入门指南就到这儿，欢迎大家多多指教，后续文章我会详细的去写<span lang="EN-US">Castle IOC</span>及其<span lang="EN-US">Facility</span>。<span style="font-size: 10pt; font-family: 宋体;">文中完整的程序：<span style="color: rgb(51, 102, 255);" lang="EN-US"><a href="http://www.cnblogs.com/files/terrylee/CastleIoc1.rar"><span style="color: rgb(51, 102, 255); text-decoration: none;" lang="EN-US"><span lang="EN-US">下载</span></span></a><br></span></span></span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"><o:p><a href="http://terrylee.cnblogs.com/Files/Terrylee/CastleIoc1.rar"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"></span></a><a title="下载" href="http://files.cnblogs.com/Terrylee/CastleIoc1.rar"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"></span></a><a title="TTTT" href="http://files.cnblogs.com/Terrylee/CastleIoc1.rar"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US"></span></a>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><b style=""><span style="font-size: 10pt; color: rgb(0, 102, 153); line-height: 150%; font-family: 宋体;">参考资料<span lang="EN-US"><o:p></o:p></span></span></b></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%;"><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;" lang="EN-US">Castle</span><span style="font-size: 10pt; line-height: 150%; font-family: 宋体;">的官方网站<span lang="EN-US"><a href="http://www.castleproject.org/">http://www.castleproject.org</a></span></span></p>
<div id="MySignature">作者：<a href="http://terrylee.cnblogs.com/">TerryLee</a><br>
出处：<a href="http://terrylee.cnblogs.com/">http://terrylee.cnblogs.com</a>
<br>
本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。
</div>
<div id="digg_block">
<div id="div_digg">										
	<div class="diggit" onclick="DiggIt(377018,14203,1)"> 
		<span class="diggnum" id="digg_count_377018">0</span>
	</div>
	<div class="buryit" onclick="DiggIt(377018,14203,2)"> 
		<span class="burynum" id="bury_count_377018">0</span>
	</div>
	<div class="clear"></div>
	<span style="display: none;" id="span_isdigged_377018">0</span>	
	<div class="diggword" id="digg_word_377018">(请您对文章做出评价)</div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev">
<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/14/374829.html">« </a> 上一篇：<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/14/374829.html" title="发布于2006-04-14 08:34">Castle ActiveRecord学习实践（9）：使用ActiveRecord的一些技巧</a><br>
<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/18/377785.html">» </a> 下一篇：<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/18/377785.html" title="发布于2006-04-18 08:35">Web2.0改变了我的生活</a><br>
</div>








		</div>
		<div class="postDesc">posted @ 2006-04-17 12:28 <a href="http://www.cnblogs.com/Terrylee/">TerryLee</a> 阅读(26249) <a href="#commentform">评论(50)</a> &nbsp;<a href="http://www.cnblogs.com/Terrylee/admin/EditPosts.aspx?postid=377018">编辑</a> <a href="http://www.cnblogs.com/Terrylee/AddToFavorite.aspx?id=377018">收藏</a> <a href="#" onclick="PutInWz();return false;">网摘</a>  所属分类: <a href="http://www.cnblogs.com/Terrylee/category/124829.html">[09]&nbsp;&nbsp;依赖注入</a>, <a href="http://www.cnblogs.com/Terrylee/category/53293.html">[12]&nbsp;&nbsp;开源世界</a></div>
	</div>
	<img src="377018.html" height="1" width="1">
	
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/Terrylee/archive/2006/04/17/377018.html"
dc:identifier="http://www.cnblogs.com/Terrylee/archive/2006/04/17/377018.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/Terrylee/services/trackbacks/377018.aspx" />
</rdf:RDF>
-->

</div><!--end: topics 文章、评论容器-->
<a name="pagedcomment"></a>
<!--done-->
<br>
<div class="feedback_area_title">发表评论</div>
<div class="feedbackNoItems"><span id="span_comment_maxid" style="display: none;">1713077</span></div>
	

		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Bruce Lee",377055,"uGvrMJm8jNRdS+9VDxDVWWNmiVOx7AAEYDObtya3ypUV4jAbrtqPnQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377055,"uGvrMJm8jNRdS+9VDxDVWWNmiVOx7AAEYDObtya3ypUV4jAbrtqPnQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Bruce+Lee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl00_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl00$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl00_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377055">#1楼</a><a name="377055" id="comment_anchor_377055"></a>2006-04-17 13:01 | <a id="Comments1_CommentList_ctl00_NameLink" href="http://www.cnblogs.com/BruceLee521/" target="_top">Bruce Lee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Bruce+Lee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377055" class="blog_comment_body">太好了，正在研究这。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377058,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377058,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl01_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl01$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl01_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377058">#2楼</a><a name="377058" id="comment_anchor_377058"></a>[<span class="louzhu">楼主</span>]2006-04-17 13:04 | <a id="Comments1_CommentList_ctl01_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377058" class="blog_comment_body">@Bruce Lee
<br>呵呵，我最近会写一系列Castle IOC的文章，希望您关注：）
<br>
<br>当然了，我也是刚开始研究Castle，并没有在用它来做过真正的项目，希望我们多多交流！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("idior",377060,"RBU1XawfBS+i6k6WTADXTrUA9Kpg4P3mFC0GzyYYDYi6hveNAXAhTg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377060,"RBU1XawfBS+i6k6WTADXTrUA9Kpg4P3mFC0GzyYYDYi6hveNAXAhTg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=idior" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl02_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl02$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl02_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377060">#3楼</a><a name="377060" id="comment_anchor_377060"></a>2006-04-17 13:06 | <a id="Comments1_CommentList_ctl02_NameLink" href="http://www.cnblogs.com/idior/" target="_top">idior</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/idior" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377060" class="blog_comment_body">castle在容器这块较之sping的配置文件方式(everything is xml)，个人比较欣赏.
<br>terrylee可以将两者比较一二。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377067,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377067,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl03_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl03$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl03_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377067">#4楼</a><a name="377067" id="comment_anchor_377067"></a>[<span class="louzhu">楼主</span>]2006-04-17 13:12 | <a id="Comments1_CommentList_ctl03_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377067" class="blog_comment_body">@idior
<br>谢谢idior的指点，接下来我会写一篇Castle IOC的深入分析的文章，另外也会写Castle IOC的配置部分。
<br>
<br>刚开始研究Castle，感觉Castle的确很优秀，呵呵~~~</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("zou114",377115,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377115,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl04_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl04$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl04_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377115">#5楼</a><a name="377115" id="comment_anchor_377115"></a>2006-04-17 13:53 | <a id="Comments1_CommentList_ctl04_NameLink" target="_blank">zou114[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377115" class="blog_comment_body">
<br>
<br>喜欢你的博客，
<br>如果你有任何查询，请“走114”：
<br><span>zou114查询指南：<a href="http://www.zou114.com/" class="smarterwiki-linkify">www.zou114.com</a>
</span><br>最全的信息查询网，
<br>
<br>希望能给你带来方便
<br>                     ------zou114祝您身体健康！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Jasonw",377138,"BggwrfElWlHxuy7qFYK7NLy9JwMog2EmzScmuMscBapkt/DB6WCrMQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377138,"BggwrfElWlHxuy7qFYK7NLy9JwMog2EmzScmuMscBapkt/DB6WCrMQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Jasonw" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl05_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl05$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl05_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377138">#6楼</a><a name="377138" id="comment_anchor_377138"></a>2006-04-17 14:16 | <a id="Comments1_CommentList_ctl05_NameLink" href="http://www.cnblogs.com/jasonw/" target="_top">Jasonw</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Jasonw" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377138" class="blog_comment_body">写的不错，不罗嗦，够清楚！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377151,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377151,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl06_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl06$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl06_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377151">#7楼</a><a name="377151" id="comment_anchor_377151"></a>[<span class="louzhu">楼主</span>]2006-04-17 14:29 | <a id="Comments1_CommentList_ctl06_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377151" class="blog_comment_body">@Jasonw
<br>谢谢支持：）</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Zhongkeruanjian",377258,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377258,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Zhongkeruanjian" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl07_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl07$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl07_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377258">#8楼</a><a name="377258" id="comment_anchor_377258"></a>2006-04-17 15:47 | <a id="Comments1_CommentList_ctl07_NameLink" href="http://www.cnblogs.com/zhongkeruanjian/" target="_top">Zhongkeruanjian</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Zhongkeruanjian" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377258" class="blog_comment_body">ILog log = (ILog) container["txtLog"];
<br>
<br>应该是对象只创建一次，就是说每次调用这个方法时其实是一个对象。这样可能是对象很“脏”。。不知实践过没？</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("YLH",377324,"Z5DpnCQ1k49kNaIlATauNHKCgi6omS27wb+6wO7m9ghRkEkVHaIoKg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377324,"Z5DpnCQ1k49kNaIlATauNHKCgi6omS27wb+6wO7m9ghRkEkVHaIoKg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=YLH" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl08_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl08$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl08_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377324">#9楼</a><a name="377324" id="comment_anchor_377324"></a>2006-04-17 16:37 | <a id="Comments1_CommentList_ctl08_NameLink" href="http://www.cnblogs.com/ylh1223/" target="_top">YLH</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/YLH" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377324" class="blog_comment_body">to Zhongkeruanjian 
<br>可以为类指定生命风格（Lifestyle）这样就可以每次都得到一个新对象，如果指定为单例模式，那么每次都是得到的同一对象。 你仔细研究一下castle ioc 源码就清楚了</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377340,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377340,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl09_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl09$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl09_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377340">#10楼</a><a name="377340" id="comment_anchor_377340"></a>[<span class="louzhu">楼主</span>]2006-04-17 16:45 | <a id="Comments1_CommentList_ctl09_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377340" class="blog_comment_body">@Zhongkeruanjian
<br>后面我会写到这方面的内容，希望您关注：）</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377342,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377342,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl10_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl10$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl10_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377342">#11楼</a><a name="377342" id="comment_anchor_377342"></a>[<span class="louzhu">楼主</span>]2006-04-17 16:46 | <a id="Comments1_CommentList_ctl10_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377342" class="blog_comment_body">@YLH
<br>
<br>多谢，以后多多交流：）</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Zhongkeruanjian",377391,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377391,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Zhongkeruanjian" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl11_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl11$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl11_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377391">#12楼</a><a name="377391" id="comment_anchor_377391"></a>2006-04-17 17:23 | <a id="Comments1_CommentList_ctl11_NameLink" href="http://www.cnblogs.com/zhongkeruanjian/" target="_top">Zhongkeruanjian</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Zhongkeruanjian" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377391" class="blog_comment_body">比如有一个重量级的对象，需要缓存创建，如果在这个重量级对象的构造子里有来自数据库或者配置文件的数据，Castle是否有过期策略配置？</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377396,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377396,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl12_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl12$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl12_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377396">#13楼</a><a name="377396" id="comment_anchor_377396"></a>[<span class="louzhu">楼主</span>]2006-04-17 17:33 | <a id="Comments1_CommentList_ctl12_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377396" class="blog_comment_body">@Zhongkeruanjian
<br>
<br>呵呵，我现在还没有研究到这一块，请继续关注本系列文章！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("阿不",377399,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377399,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e9%98%bf%e4%b8%8d" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl13_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl13$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl13_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377399">#14楼</a><a name="377399" id="comment_anchor_377399"></a>2006-04-17 17:35 | <a id="Comments1_CommentList_ctl13_NameLink" href="http://www.cnblogs.com/hjf1223/" target="_top">阿不</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e9%98%bf%e4%b8%8d" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377399" class="blog_comment_body">@Zhongkeruanjian
<br>  在Castle的组件实例中有几种生命周期：对象池，线程模式（在同一线程都使用同一实例），瞬时对象（Transient,普通new的对象）,还有单件模式,还可以自定义模式.</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377409,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377409,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl14_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl14$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl14_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377409">#15楼</a><a name="377409" id="comment_anchor_377409"></a>[<span class="louzhu">楼主</span>]2006-04-17 17:50 | <a id="Comments1_CommentList_ctl14_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377409" class="blog_comment_body">@阿不
<br>Thanks~~~~，呵呵！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Zhongkeruanjian",377412,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377412,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Zhongkeruanjian" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl15_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl15$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl15_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377412">#16楼</a><a name="377412" id="comment_anchor_377412"></a>2006-04-17 17:53 | <a id="Comments1_CommentList_ctl15_NameLink" href="http://www.cnblogs.com/zhongkeruanjian/" target="_top">Zhongkeruanjian</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Zhongkeruanjian" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377412" class="blog_comment_body">@阿不 
<br>
<br>现在不是说对象的生命周期，是说在缓存模式下的过期策略。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("阿不",377448,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377448,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e9%98%bf%e4%b8%8d" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl16_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl16$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl16_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377448">#17楼</a><a name="377448" id="comment_anchor_377448"></a>2006-04-17 18:34 | <a id="Comments1_CommentList_ctl16_NameLink" href="http://www.cnblogs.com/hjf1223/" target="_top">阿不</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e9%98%bf%e4%b8%8d" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377448" class="blog_comment_body">缓存模式?</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("阿不",377449,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377449,"BqhhGCSxB9O/5u1ynpky03rSk8BU+Y3c3bQ4sJEtwJUF1DJvYPzsIw==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e9%98%bf%e4%b8%8d" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl17_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl17$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl17_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377449">#18楼</a><a name="377449" id="comment_anchor_377449"></a>2006-04-17 18:35 | <a id="Comments1_CommentList_ctl17_NameLink" href="http://www.cnblogs.com/hjf1223/" target="_top">阿不</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e9%98%bf%e4%b8%8d" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377449" class="blog_comment_body">@Zhongkeruanjian
<br>你是指什么样的缓存模式?</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("自由、创新、研究、探索……",377549,"PE4stGY1Q6wQeReRphN0I/Y7XTl3oKoHGlmSeY5VzhIavWU0cfgNbg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377549,"PE4stGY1Q6wQeReRphN0I/Y7XTl3oKoHGlmSeY5VzhIavWU0cfgNbg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e8%87%aa%e7%94%b1%e3%80%81%e5%88%9b%e6%96%b0%e3%80%81%e7%a0%94%e7%a9%b6%e3%80%81%e6%8e%a2%e7%b4%a2%e2%80%a6%e2%80%a6" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl18_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl18$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl18_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377549">#19楼</a><a name="377549" id="comment_anchor_377549"></a>2006-04-17 21:07 | <a id="Comments1_CommentList_ctl18_NameLink" href="http://www.cnblogs.com/shanyou/" target="_top">自由、创新、研究、探索……</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e8%87%aa%e7%94%b1%e3%80%81%e5%88%9b%e6%96%b0%e3%80%81%e7%a0%94%e7%a9%b6%e3%80%81%e6%8e%a2%e7%b4%a2%e2%80%a6%e2%80%a6" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377549" class="blog_comment_body">现在有这么多人研究Castle,看来Castle真正流行的时候到了.我1年前开始研究的时候,没有什么文档,现在好多了,在我的blog中有很多Castle的内容.半年前我还给深圳兄弟做了一个Castle的介绍,当时参加的人都是一头雾水.现在还有哪个ppt,<a target="_new" href="http://shanyou.cnblogs.com/archive/2005/08/21/219738.html">http://shanyou.cnblogs.com/archive/2005/08/21/219738.html,这里可以找到Martin</a> Fowler大师的文章的中文版本.</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",377795,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(377795,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl19_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl19$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl19_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#377795">#20楼</a><a name="377795" id="comment_anchor_377795"></a>[<span class="louzhu">楼主</span>]2006-04-18 08:50 | <a id="Comments1_CommentList_ctl19_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_377795" class="blog_comment_body">@自由、创新、研究、探索……
<br>我也开始研究不久，不过Castle真的很优秀，该是流行的时候了:-)
<br>
<br>谢谢你提供的资料！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Bear.sTaR{R}",402404,"1P6Z9LtYiMGFetQT/N7715Np/Zv3L0joV+I/w84wxfc7ttP0yiovIQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(402404,"1P6Z9LtYiMGFetQT/N7715Np/Zv3L0joV+I/w84wxfc7ttP0yiovIQ==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Bear.sTaR%7bR%7d" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl20_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl20$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl20_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#402404">#21楼</a><a name="402404" id="comment_anchor_402404"></a>2006-05-17 13:29 | <a id="Comments1_CommentList_ctl20_NameLink" href="http://www.cnblogs.com/BearsTaR/" target="_top">Bear.sTaR{R}</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Bear.sTaR%7bR%7d" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_402404" class="blog_comment_body">IWindsorContainer container = new WindsorContainer( new XmlInterpreter("../../BasicUsage.xml") );
<br>
<br>请问楼主BasicUsage.xml是个什么文件，配置？
<br>这个文件在哪里
<br>
<br>新手学习....</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("无痕",402472,"htLthvQSJn88/PgwkhSTMi0h/3bfGSBs0FwCdE95ENH82MNE+sWhJA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(402472,"htLthvQSJn88/PgwkhSTMi0h/3bfGSBs0FwCdE95ENH82MNE+sWhJA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e6%97%a0%e7%97%95" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl21_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl21$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl21_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#402472">#22楼</a><a name="402472" id="comment_anchor_402472"></a>2006-05-17 14:36 | <a id="Comments1_CommentList_ctl21_NameLink" href="http://www.cnblogs.com/Bruce_H21/" target="_top">无痕</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e6%97%a0%e7%97%95" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_402472" class="blog_comment_body">请教一下Terrylee ，您所举的例子里面的这句话
<br> string _MsgStr = _format.Format(MsgStr);
<br>中的_format对象是否和martinfowler的这句
<br> List allMovies = finder.findAll();
<br>中的finder对象是否具有异曲同工的地方呢？</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",403029,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(403029,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl22_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl22$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl22_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#403029">#23楼</a><a name="403029" id="comment_anchor_403029"></a>[<span class="louzhu">楼主</span>]2006-05-18 08:43 | <a id="Comments1_CommentList_ctl22_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_403029" class="blog_comment_body">@无痕
<br>参见文中的第四步：
<br>4．编写配置文件
<br>
<br>指的就是BasicUsage.xml文件，也可以放在Web.config或者App.config里面</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Terrylee",403032,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(403032,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Terrylee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl23_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl23$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl23_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#403032">#24楼</a><a name="403032" id="comment_anchor_403032"></a>[<span class="louzhu">楼主</span>]2006-05-18 08:45 | <a id="Comments1_CommentList_ctl23_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">Terrylee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Terrylee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_403032" class="blog_comment_body">@无痕
<br>
<br>我这里只是为了举例用到几个组件，且它们之间有依赖关系，再用IOC容器来管理！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("27745754",408752,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(408752,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl24_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl24$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl24_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#408752">#25楼</a><a name="408752" id="comment_anchor_408752"></a>2006-05-25 11:26 | <a id="Comments1_CommentList_ctl24_NameLink" target="_blank">27745754[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_408752" class="blog_comment_body">在自动装配的时候如果有多个类实现同一个接口（服务），它会自动选择哪个来进行装配。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",408936,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(408936,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl25_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl25$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl25_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#408936">#26楼</a><a name="408936" id="comment_anchor_408936"></a>[<span class="louzhu">楼主</span>]2006-05-25 14:11 | <a id="Comments1_CommentList_ctl25_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_408936" class="blog_comment_body">@27745754
<br>
<br>参见：<a target="_new" href="http://terrylee.cnblogs.com/archive/2006/05/25/408923.html">http://terrylee.cnblogs.com/archive/2006/05/25/408923.html</a></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("木头一个",411656,"feM00agBt/wKn3nJ2QnLAQJloF2dz3rEieTLHULV4rpFliLZSHGc4Q==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(411656,"feM00agBt/wKn3nJ2QnLAQJloF2dz3rEieTLHULV4rpFliLZSHGc4Q==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e6%9c%a8%e5%a4%b4%e4%b8%80%e4%b8%aa" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl26_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl26$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl26_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#411656">#27楼</a><a name="411656" id="comment_anchor_411656"></a>2006-05-29 08:15 | <a id="Comments1_CommentList_ctl26_NameLink" href="http://www.cnblogs.com/badwood/" target="_top">木头一个</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e6%9c%a8%e5%a4%b4%e4%b8%80%e4%b8%aa" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_411656" class="blog_comment_body">其实另外一种注册Component的方法你要附带说明一下就更好了。就是在BaseUsage.xml同样可以注册Component，而可以不需要在代码中去写container.AddComponent();
<br>
<br>将BaseUsage.xml文件中的&lt;components/&gt;节点改写如下：
<br>&lt;components&gt;
<br>		&lt;component id="target" service="CastleIOC1.ILog, CastleIOC1" type="CastleIOC1.TextFileLog, CastleIOC1"&gt;
<br>			&lt;parameters&gt;
<br>				&lt;target&gt;Log.txt&lt;/target&gt;
<br>			&lt;/parameters&gt;
<br>		&lt;/component&gt;
<br>		&lt;component id="format" service="CastleIOC1.ILogFormatter, CastleIOC1" type="CastleIOC1.TextFormatter, CastleIOC1"&gt;
<br>		&lt;/component&gt;
<br>	&lt;/components&gt;
<br>在注册组件的代码中可以注释掉那两句注册的代码的。这也非常有用。
<br>当然我也明白你肯定是知道的，只是没有说出来。呵呵，帮你补一下，班门弄斧了，给初学者帮助。
<br>
<br>同时也很感谢你的系列文章，让我学到了不少东西。</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",412083,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(412083,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl27_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl27$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl27_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#412083">#28楼</a><a name="412083" id="comment_anchor_412083"></a>[<span class="louzhu">楼主</span>]2006-05-29 15:02 | <a id="Comments1_CommentList_ctl27_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_412083" class="blog_comment_body">@木头一个
<br>
<br>谢谢补充！的确应该把这个加上:-)</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("jijl2001",473474,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(473474,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl28_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl28$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl28_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#473474">#29楼</a><a name="473474" id="comment_anchor_473474"></a>2006-08-10 16:21 | <a id="Comments1_CommentList_ctl28_NameLink" target="_blank">jijl2001[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_473474" class="blog_comment_body">上面的一段配置有错误</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",473574,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(473574,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl29_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl29$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl29_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#473574">#30楼</a><a name="473574" id="comment_anchor_473574"></a>[<span class="louzhu">楼主</span>]2006-08-10 17:29 | <a id="Comments1_CommentList_ctl29_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_473574" class="blog_comment_body">@jijl2001
<br>你指的是哪一段呢？</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("藤条焖猪肉",493366,"BL1ruKWR5myXqlQi5u3naSQiTTs4lHaftGUGKBdCr6udMXJaKgqOOg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(493366,"BL1ruKWR5myXqlQi5u3naSQiTTs4lHaftGUGKBdCr6udMXJaKgqOOg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e8%97%a4%e6%9d%a1%e7%84%96%e7%8c%aa%e8%82%89" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl30_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl30$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl30_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#493366">#31楼</a><a name="493366" id="comment_anchor_493366"></a>2006-09-02 23:10 | <a id="Comments1_CommentList_ctl30_NameLink" href="http://www.cnblogs.com/nicolas185/" target="_top">藤条焖猪肉</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e8%97%a4%e6%9d%a1%e7%84%96%e7%8c%aa%e8%82%89" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_493366" class="blog_comment_body">&lt;component id="target" service="CastleIOC1.ILog, CastleIOC1" type="CastleIOC1.TextFileLog, CastleIOC1"&gt; 
<br>
<br>id="txtLog"
<br>
<br>打错字而已，没什么大概，继续关注</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",494053,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(494053,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl31_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl31$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl31_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#494053">#32楼</a><a name="494053" id="comment_anchor_494053"></a>[<span class="louzhu">楼主</span>]2006-09-04 08:18 | <a id="Comments1_CommentList_ctl31_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_494053" class="blog_comment_body">@藤条焖猪肉
<br>？</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Bob[匿名]",503272,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(503272,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl32_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl32$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl32_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#503272">#33楼</a><a name="503272" id="comment_anchor_503272"></a>2006-09-13 15:54 | <a id="Comments1_CommentList_ctl32_NameLink" target="_blank">Bob[匿名][未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_503272" class="blog_comment_body">改用配置文件：&lt;?xml version="1.0" encoding="utf-8" ?&gt;
<br>&lt;configuration&gt;
<br>	&lt;components&gt;
<br>		&lt;component id ="txtLog" service="CastleIoc1.ILog,CastleIoc1" type="CastleIoc1.TextFileLog,CastleIoc1"&gt;
<br>			&lt;parameters&gt;
<br>				&lt;target&gt;Log.txt&lt;/target&gt;
<br>			&lt;/parameters&gt;
<br>		&lt;/component&gt;
<br>		&lt;component id="format" service="CastleIoc1.ILogFormatter,CastleIoc1" type="CastleIoc1.TextFormatter,CastleIoc1"&gt;&lt;/component&gt;
<br>	&lt;/components&gt;
<br>&lt;/configuration&gt;
<br>
<br>
<br>注释掉，如下代码：“
<br>//加入组件
<br>            //container.AddComponent("txtLog",
<br>            //    typeof(ILog), typeof(TextFileLog));
<br>
<br>            //container.AddComponent("format",
<br>            //    typeof(ILogFormatter), typeof(TextFormatter));”
<br>按F5运行时，在ILog log = (ILog)container["txtLog"];处出现类型转换错误。为什么？
<br></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("codelover",518451,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(518451,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl33_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl33$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl33_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#518451">#34楼</a><a name="518451" id="comment_anchor_518451"></a>2006-09-29 17:17 | <a id="Comments1_CommentList_ctl33_NameLink" rel="nofllow" href="http://www.cnitblog.com/r.aspx?url=http://www.codelover.com" target="_top">codelover[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_518451" class="blog_comment_body">.net开源框架qq群30017484，Castle ActiveRecord、Nhibernate、ibatisnet、IOC容器Spring.Net和Castle、等框架讨论学习，欢迎加入，共同f提高</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("qcrsoft",592835,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(592835,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl34_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl34$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl34_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#592835">#35楼</a><a name="592835" id="comment_anchor_592835"></a>2006-12-15 09:00 | <a id="Comments1_CommentList_ctl34_NameLink" target="_blank">qcrsoft[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_592835" class="blog_comment_body">添砖加瓦
<br>
<br>《属性值注入 还是 构造函数注入》
<br>来源：<a target="_new" href="http://www.isedu.cn/article/dotnet_5.shtml">http://www.isedu.cn/article/dotnet_5.shtml</a>
<br>内容：对于IOC的两种注入方式(属性值注入和构造函数注入)选择,应该考虑到以下几种因素:
<br>1.使用属性值注入使得很容易处理默认值和任意值,在这种情况下并不必须设定每个属性值.使用构造函数注入,容易导致产生多个多个构造函数,彼此调用.多个构造函数或多个参数将使得程序冗长和不易管理.
<br>2.使用属性值注入(属性值不为private)将会自动使子类继承,然而gouzaohanshu却不能.后者的限制使得子类只有创建一个和父类相关的样板函数,他将会调用父类构造函数.然而不论用哪种方式,现在大多数IDE都会很容易生成构造函数或是属性.
<br>3.使用属性值注入生成JAVA文档比构造函数注入更容易.
<br>4.运行时环境下,属性值注入可以使用反射通过属性名称操作属性.然而构造函数注入,编译后的class文件不会维持构造函数的参数空间,因此自动根据名称匹配调用不可能.
<br>5.属性值注入允许获取和设置属性状态(值),这种情况有益于很多状况,比如属性状态要持久化到任何存储媒介.
<br>6.属性值注入可以使用PropertyEditor机制在需要时自动进行类型转化,spring支持这种情况.
<br>7.属性值注入由于可以多次调用setter方法使得容易改变.</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("TerryLee",592872,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(592872,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl35_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl35$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl35_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#592872">#36楼</a><a name="592872" id="comment_anchor_592872"></a>[<span class="louzhu">楼主</span>]2006-12-15 09:15 | <a id="Comments1_CommentList_ctl35_NameLink" href="http://www.cnblogs.com/Terrylee/" target="_top">TerryLee</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/TerryLee" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_592872" class="blog_comment_body">@qcrsoft
<br>谢谢补充！</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("qcrsoft",592898,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(592898,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl36_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl36$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl36_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#592898">#37楼</a><a name="592898" id="comment_anchor_592898"></a>2006-12-15 09:23 | <a id="Comments1_CommentList_ctl36_NameLink" target="_blank">qcrsoft[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_592898" class="blog_comment_body">添砖加瓦 （窗口关了，不知从哪个BLOG个抄来的了）
<br>
<br>《两个个很形象的依赖注入的比喻》
<br>何谓控制反转（IoC = Inversion of Control），何谓依赖注入（DI = Dependency Injection）？一直都半懂不懂，今天看到两个比喻，觉得比较形象。
<br>IoC，用白话来讲，就是由容器控制程序之间的关系，而非传统实现中，由程序代码直接操控。这也就是所谓"控制反转"的概念所在：控制权由应用代码中转到了外部容器，控制权的转移，是所谓反转。
<br>正在业界为IoC争吵不休时，大师级人物Martin Fowler也站出来发话，以一篇经典文章《Inversion of Control Containers and the Dependency Injection pattern》为IoC正名，至此，IoC又获得了一个新的名字："依赖注入 （Dependency Injection）"。相对IoC 而言，"依赖注入"的确更加准确的描述了这种古老而又时兴的设计理念。从名字上理解，所谓依赖注入，即组件之间的依赖关系由容器在运行期决定，形象的来说，即由容器动态的将某种依赖关系注入到组件之中。
<br>一：
<br>再看上例中，笔记本电脑与外围存储设备通过预先指定的一个接口（USB）相连，对于笔记本而言，只是将用户指定的数据发送到USB接口，而这些数据何去何从，则由当前接入的USB设备决定。在USB设备加载之前，笔记本不可能预料用户将在USB接口上接入何种设备，只有USB设备接入之后，这种设备之间的依赖关系才开始形成。
<br>对应上面关于依赖注入机制的描述，在运行时（系统开机，USB 设备加载）由容器（运行在笔记本中的Windows操作系统）将依赖关系（笔记本依赖USB设备进行数据存取）注入到组件中（Windows文件访问组件）。这就是依赖注入模式在现实世界中的一个版本。
<br>很多初学者常常陷入"依赖注入，何用之有？"的疑惑。想来这个例子可以帮助大家简单的理解其中的含义。依赖注入的目标并非为软件系统带来更多的功能，而是为了提升组件重用的概率，并为系统搭建一个灵活、可扩展的平台。将USB接口和之前的串/并、PS2接口对比，想必大家就能明白其中的意味。
<br>二：
<br>首先想说说IoC（Inversion of Control，控制倒转）。这是spring的核心，贯穿始终。所谓IoC，对于spring框架来说，就是由spring来负责控制对象的生命周期和对象间的关系。这是什么意思呢，举个简单的例子，我们是如何找女朋友的？常见的情况是，我们到处去看哪里有长得漂亮身材又好的mm，然后打听她们的兴趣爱好、qq号、电话号、ip号、iq号………，想办法认识她们，投其所好送其所要，然后嘿嘿……这个过程是复杂深奥的，我们必须自己设计和面对每个环节。传统的程序开发也是如此，在一个对象中，如果要使用另外的对象，就必须得到它（自己new一个，或者从JNDI中查询一个），使用完之后还要将对象销毁（比如Connection等），对象始终会和其他的接口或类藕合起来。
<br>　　那么IoC是如何做的呢？有点像通过婚介找女朋友，在我和女朋友之间引入了一个第三者：婚姻介绍所。婚介管理了很多男男女女的资料，我可以向婚介提出一个列表，告诉它我想找个什么样的女朋友，比如长得像李嘉欣，身材像林熙雷，唱歌像周杰伦，速度像卡洛斯，技术像齐达内之类的，然后婚介就会按照我们的要求，提供一个mm，我们只需要去和她谈恋爱、结婚就行了。简单明了，如果婚介给我们的人选不符合要求，我们就会抛出异常。整个过程不再由我自己控制，而是有婚介这样一个类似容器的机构来控制。Spring所倡导的开发方式就是如此，所有的类都会在spring容器中登记，告诉spring你是个什么东西，你需要什么东西，然后spring会在系统运行到适当的时候，把你要的东西主动给你，同时也把你交给其他需要你的东西。所有的类的创建、销毁都由spring来控制，也就是说控制对象生存周期的不再是引用它的对象，而是spring。对于某个具体的对象而言，以前是它控制其他对象，现在是所有对象都被spring控制，所以这叫控制反转。如果你还不明白的话，我决定放弃。
<br></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("qcrsoft",592989,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(592989,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl37_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl37$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl37_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#592989">#38楼</a><a name="592989" id="comment_anchor_592989"></a>2006-12-15 10:16 | <a id="Comments1_CommentList_ctl37_NameLink" target="_blank">qcrsoft[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_592989" class="blog_comment_body">上例中
<br>public class TextFileLog : ILog
<br>这个类现有构造函数
<br>public TextFileLog(string target,ILogFormatter format)
<br>另外配置文件写的写法是
<br>&lt;component id="txtLog"&gt;
<br>　&lt;parameters&gt;
<br>　　&lt;target&gt;log.txt&lt;/target&gt;
<br>　&lt;/parameters&gt;
<br>&lt;/component&gt;
<br>经过“自动装配”，第二个参数不用写，所以上面这个构造函数会被调用。
<br>
<br>ＯＫ，上面读很清楚。
<br>
<br>不过我又加了个构造函数
<br>public TextFileLog(string target)
<br>配置文件不变，按想象想必大家大多都认为应该是这个构造函数被调用是吧？实际跑了一下，居然还是TextFileLog(string target,ILogFormatter format)被调用！
<br>（补充一下，不过用处好象也不大，见笑）
<br></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("damnedmoon",663386,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(663386,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl38_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl38$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl38_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#663386">#39楼</a><a name="663386" id="comment_anchor_663386"></a>2007-03-04 14:45 | <a id="Comments1_CommentList_ctl38_NameLink" target="_blank">damnedmoon[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_663386" class="blog_comment_body">@Bob
<br>估计和.Net对于动态加载的Assembly和静态引用的Assembly的区别对待有关。在某种条件下，哪怕静态的和动态的指向都为相同Assembly,Framework会把它们视为完全不同。园子里有不少人研究过这个问题，可查询相关文章。
<br>此处，可如下解决：
<br>1。把借口和实现放到独立的dll中，主程序引用此dll；
<br>2。注意：接口和实现的namespace改成和主程序不同的namespace。
<br></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("QQ124294272",711837,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(711837,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl39_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl39$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl39_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#711837">#40楼</a><a name="711837" id="comment_anchor_711837"></a>2007-04-13 11:57 | <a id="Comments1_CommentList_ctl39_NameLink" target="_blank">QQ124294272[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_711837" class="blog_comment_body">精典,终于懂得了IOC的概念</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("鸿江",717914,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(717914,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl40_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl40$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl40_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#717914">#41楼</a><a name="717914" id="comment_anchor_717914"></a>2007-04-18 10:56 | <a id="Comments1_CommentList_ctl40_NameLink" target="_blank">鸿江[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_717914" class="blog_comment_body">刚开始学, 非常感谢</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("ttloveyou3344",780794,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(780794,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl41_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl41$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl41_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#780794">#42楼</a><a name="780794" id="comment_anchor_780794"></a>2007-06-12 17:09 | <a id="Comments1_CommentList_ctl41_NameLink" target="_blank">ttloveyou3344[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_780794" class="blog_comment_body">webconfig里还要加几句代码完整的如下：
<br>?xml version="1.0" encoding="utf-8" ?&gt;
<br>&lt;configuration&gt;
<br>	&lt;configSections&gt;
<br>		&lt;section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/&gt;
<br>	&lt;/configSections&gt;
<br>	&lt;castle&gt;
<br>		&lt;components&gt;
<br>			&lt;component id="txtLog" service="castletest.ILog1, castletest" type="castletest.TextFileLog, castletest"&gt;
<br>				&lt;parameters&gt;
<br>					&lt;target&gt;log.txt&lt;/target&gt;
<br>				&lt;/parameters&gt;
<br>			&lt;/component&gt;
<br>			&lt;component id="format" service="castletest.ILogFormatter, castletest" type="castletest.TextFormatter, castletest"&gt;
<br>				&lt;parameters&gt;
<br>					&lt;mstext&gt;sdfsdf&lt;/mstext&gt;
<br>					&lt;/parameters&gt;
<br>			&lt;/component&gt;
<br>		&lt;/components&gt;
<br>	&lt;/castle&gt;
<br>&lt;/configuration&gt;
<br>调用的时候把IWindsorContainer container = new WindsorContainer( new XmlInterpreter("../../BasicUsage.xml") );
<br>换成 this.kernel = new WindsorContainer(new XmlInterpreter(new ConfigResource())).Kernel;呵呵，换种方式实现，同时把注册的那两句去掉
<br>调用如ILog1 log = (ILog1)kernel["txtLog"];呵呵，我也来凑热闹</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("猫猫",867316,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(867316,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl42_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl42$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl42_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#867316">#43楼</a><a name="867316" id="comment_anchor_867316"></a>2007-08-23 19:30 | <a id="Comments1_CommentList_ctl42_NameLink" target="_blank">猫猫[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_867316" class="blog_comment_body">刚接触, 看了两个比喻, 很清楚, 谢谢.</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("ttt",878783,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(878783,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl43_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl43$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl43_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#878783">#44楼</a><a name="878783" id="comment_anchor_878783"></a>2007-09-02 11:06 | <a id="Comments1_CommentList_ctl43_NameLink" target="_blank">ttt[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_878783" class="blog_comment_body">有点看不懂
<br></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("笨→鸟(Bird)",974575,"C9k5DuT40UYtqVmhlX8o3oVfHquT/u16J7mn49U/J6U6X4SgGrrGAA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(974575,"C9k5DuT40UYtqVmhlX8o3oVfHquT/u16J7mn49U/J6U6X4SgGrrGAA==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e7%ac%a8%e2%86%92%e9%b8%9f%28Bird%29" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl44_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl44$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl44_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#974575">#45楼</a><a name="974575" id="comment_anchor_974575"></a>2007-11-27 19:33 | <a id="Comments1_CommentList_ctl44_NameLink" href="http://www.cnblogs.com/beniao/" target="_top">笨→鸟(Bird)</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e7%ac%a8%e2%86%92%e9%b8%9f%28Bird%29" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_974575" class="blog_comment_body">那为朋友可以帮我发一个上面的实例过来啊,感谢万分!
<br>
<br><span><a href="mailto:beniao123@163.com" class="smarterwiki-linkify">beniao123@163.com</a></span></span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Old",1565077,"WrwYQZZtkC9ZJeNggS23daoG0WfvKTLRsnbKD4I3T5J3iPY7p9Klxg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1565077,"WrwYQZZtkC9ZJeNggS23daoG0WfvKTLRsnbKD4I3T5J3iPY7p9Klxg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Old" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl45_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl45$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl45_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#1565077">#46楼</a><a name="1565077" id="comment_anchor_1565077"></a>2009-06-22 13:42 | <a id="Comments1_CommentList_ctl45_NameLink" href="http://www.cnblogs.com/bruceleeliya/" target="_top">Old</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/Old" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_1565077" class="blog_comment_body">:-)</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("破孩",1638191,"MCM9a/uYl4KALm2FO86cvN390RyskLW9vPczfxv6shp5mcyUgXbrcg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1638191,"MCM9a/uYl4KALm2FO86cvN390RyskLW9vPczfxv6shp5mcyUgXbrcg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e7%a0%b4%e5%ad%a9" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl46_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl46$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl46_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#1638191">#47楼</a><a name="1638191" id="comment_anchor_1638191"></a>2009-09-07 10:16 | <a id="Comments1_CommentList_ctl46_NameLink" href="http://www.cnblogs.com/poorboy/" target="_top">破孩</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/%e7%a0%b4%e5%ad%a9" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_1638191" class="blog_comment_body">恩，不错，那个例子讲的非常明白。谢谢楼主</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("Castler",1687037,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1687037,"")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl47_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl47$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl47_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#1687037">#48楼</a><a name="1687037" id="comment_anchor_1687037"></a>2009-11-01 00:52 | <a id="Comments1_CommentList_ctl47_NameLink" target="_blank">Castler[未注册用户]</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_1687037" class="blog_comment_body">15476416，专题讨论Castle的QQ群</span><br>
			</div>
		</div>
	
		<div class="feedbackItem">
			<div class="feedbackListSubtitle">
				<div class="feedbackManage">
					&nbsp;&nbsp;<a onclick='ReplyComment("WangKai",1713077,"oxVaXtQLRL6KwWvjt5u5lk3KpvIrZZHHn0dyaldo7aSxz5SmiUTPwg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">回复</a>&nbsp;&nbsp;<a onclick='QuoteComment(1713077,"oxVaXtQLRL6KwWvjt5u5lk3KpvIrZZHHn0dyaldo7aSxz5SmiUTPwg==")' href="http://terrylee.cnblogs.com/archive/2006/04/17/377018.html#commentform">引用</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=WangKai" target="_top">查看</a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl48_DeleteLink" href="javascript:__doPostBack('Comments1$CommentList$ctl48$DeleteLink','')"></a>&nbsp;&nbsp;<a id="Comments1_CommentList_ctl48_EditLink" causesvalidation="False"></a>
				</div>
				<a href="#1713077">#49楼</a><a name="1713077" id="comment_anchor_1713077"></a><a name="Post"></a>2009-12-02 16:54 | <a id="Comments1_CommentList_ctl48_NameLink" href="http://home.cnblogs.com/73058/" target="_top">WangKai</a>&nbsp;<a href="http://space.cnblogs.com/msg/send/WangKai" title="给此人发送站内短消息" class="sendMsg2This">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
			</div>
			<div class="feedbackCon">
				<span id="comment_body_1713077" class="blog_comment_body">看过恩的很多文章，如Silverlight,ajax等等，受益匪浅，非常感谢,继续关注</span><br>
			</div>
		</div>
	

<div id="ctl05_comment_form" class="commentform">




<div id="ctl05_divLoginPannel">
<div class="login_tips">注册用户登录后才能发表评论，请 <a href="http://passport.cnblogs.com/login.aspx?ReturnUrl=http%3a%2f%2fterrylee.cnblogs.com%2farchive%2f2006%2f04%2f17%2f377018.html%3flogin%3d1%23commentform" class="underline">登录</a> 或 <a href="http://passport.cnblogs.com/register.aspx?ReturnUrl=http%3a%2f%2fterrylee.cnblogs.com%2farchive%2f2006%2f04%2f17%2f377018.html%23Bottom2" class="underline">注册</a> 。</div>
</div>

<div class="itnews c_ad_block" id="itnews">
<a href="http://news.cnblogs.com/" target="_top">IT新闻</a>:<br>

          ·  <a href="http://news.cnblogs.com/n/55114/" target="_top">谷歌联手亚马逊在英国推出Android音乐商店</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55112/" target="_top">Facebook成为Apache软件基金会黄金赞助商</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55111/" target="_top">IBM荣获2009年美国专利申请冠军</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55100/" target="_top">麦当劳美国餐馆Wi-Fi服务全面免费</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/55097/" target="_top">Java SE 6更新，性能大幅提升</a><br>
	
</div>


<div id="ad_under_comment" class="c_ad_block">
<a href="http://a4.yeshj.com/rd/34138/" target="_top">每天10分钟，轻松学英语</a><br><br>
<div id="google_ads_div_cnblogs_blogpost_bottom1">
<iframe src="index_1.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom1" id="google_ads_iframe_cnblogs_blogpost_bottom1" scrolling="no" frameborder="0" height="60" width="468"></iframe></div>

<br>
<div id="google_ads_div_cnblogs_blogpost_bottom">
<iframe src="index_2.html" style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_cnblogs_blogpost_bottom" id="google_ads_iframe_cnblogs_blogpost_bottom" scrolling="no" frameborder="0" height="250" width="300"></iframe></div>

</div>
<div id="site_nav_under" class="c_ad_block">
网站导航：<br>
<a href="http://www.cnblogs.com/" target="_top">博客园首页</a> &nbsp;<a href="http://news.cnblogs.com/" target="_top">IT新闻</a> &nbsp;<a href="http://home.cnblogs.com/" target="_top">个人主页</a> &nbsp;<a href="http://home.cnblogs.com/ing/" target="_top">闪存</a> &nbsp;<a href="http://job.cnblogs.com/" target="_top">程序员招聘</a> &nbsp;<a href="http://space.cnblogs.com/" target="_top">社区</a> &nbsp;<a href="http://space.cnblogs.com/q/" target="_top">博问</a> &nbsp;<a href="http://wz.cnblogs.com/" target="_top">网摘</a>
</div>
<div id="ad_under_comment2" class="c_ad_block">
<a href="http://www.china-pub.com/STATIC07/0912/zh_ndcx_091212.asp" target="_top"><img src="chinapub_20091222.jpg" alt="" style="border: 0px none ;"></a><br>
<a href="http://www.china-pub.com/itbook/" target="_top">China-pub 计算机图书网上专卖店！6.5万品种2-8折！</a><br>
<a href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" target="_top">China-Pub 计算机绝版图书按需印刷服务</a><br>
</div>

<div id="relative_search"><br><b>相关搜索:</b><br> <a href="http://zzk.cnblogs.com/s?w=%5b09%5d%e4%be%9d%e8%b5%96%e6%b3%a8%e5%85%a5" target="_top">[09]依赖注入</a> <a href="http://zzk.cnblogs.com/s?w=%5b12%5d%e5%bc%80%e6%ba%90%e4%b8%96%e7%95%8c" target="_top">[12]开源世界</a> </div><div id="relative_search"><br><b>在知识库中查看：</b><br> <a href="http://kb.cnblogs.com/a/377018/">Castle IOC容器快速入门</a></div>

</div>


				
	</div><!--end: forFlow -->
	</div><!--end: mainContent 主体内容容器-->

	<div id="sideBar">
		<div id="sideBarMain">
			
<!--done-->
<div class="newsItem">
<h3 class="catListTitle">公告</h3>
	<div class="box">
<h3 class="boxtitle">个人简介</h3>
<ul>
    <li><img src="o_terrylee.png" alt=""></li>
    <li>网名：TerryLee</li>
    <li>本名：李会军</li>
    <li>位置：中国 北京</li>
    <li>请大家发邮件至</li>
    <li><img src="o_terrylee_cnblogs.png" alt="TerryLee"></li>
   </ul>
</div>
<div class="box">
<h3 class="boxtitle">关注我</h3>
<a href="http://twitter.com/TerryLeeTech"><img src="followme.png" alt="在Twitter上关注我" style="margin-left: 5px;"></a>
<a href="http://www.dotneteye.cn/blog/syndication.axd"><img src="feedadd.png" alt="订阅我的Blog" style="margin-left: 15px;"></a>
</div>
<div class="box">
<h3 class="boxtitle">我的著作</h3>
<ul>
    <li><img alt="" src="o_silverlight02.jpg" border="0"></li>
    <li>官网：<a href="http://www.dotneteye.cn/silverlight">《Silverlight 2完美征程》</a></li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">我在说</h3>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/TerryLeeTech" id="twitter-link" style="display: block; text-align: right;">follow me on Twitter</a>
</div>
<div class="box">
<h3 class="boxtitle">MVP配置</h3>
<ul>
    <li><img alt="" src="o_o_mvp_horizontal_fullcolor_182_74.png" border="0"></li>
    <li><a href="https://mvp.support.microsoft.com/profile=8FECB25C-0CBC-432F-9F25-E2698DDF3CA1">MVP配置</a></li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">个人主页</h3>
<ul>
<li>
<a href="http://www.dotneteye.cn/"><img src="o_dotnet.png" alt=""></a>
</li>
</ul>
</div>
<div class="box">
<h3 class="boxtitle">版权声明</h3>
    <ul>
        <li>本站采用<a href="http://creativecommons.org/licenses/by-nc/2.5/" target="_top" rel="license">创作共用</a>许可
        署名，非商业
<a href="http://www.51.la/?00260513" target="_top"><img alt="51.la 专业、免费、强健的访问统计" src="icon_8.gif" style="border: medium none ;"></a>
<img style="width: 0px; height: 0px;" src="go.asp">
        </li></ul>
    </div>
<div class="box">
<h3 class="boxtitle">绿色通道</h3>
  <ul>
   <li>1.<a href="http://www.cnblogs.com/Terrylee/archive/2008/03/09/Silverlight2-step-by-step-Tutorials.html">一步一步学Silverlight 2系列</a></li>
<li>2.<a href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">.NET设计模式系列文章</a></li>
<li>3.<a href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/558683.html">ASP.NET AJAX入门系列</a></li>
<li>4.<a href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/387503.html">Castle开发系列文章</a></li>
<li>5.<a href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/464591.html">Enterprise Library系列</a></li>
<li><a href="http://dotnet.cnblogs.com/">博客园.NET频道</a></li>
  </ul>
</div><div id="profile_block"><a href="http://home.cnblogs.com/Terrylee/" target="_top">我的主页</a>&nbsp; <a href="http://home.cnblogs.com/Terrylee/detail/" target="_top">个人资料</a><br><a href="http://home.cnblogs.com/Terrylee/ing/" target="_top">我的闪存</a>&nbsp; <a href="http://space.cnblogs.com/msg/send/TerryLee" target="_top">发短消息</a></div>
</div>

			
			
			<div id="leftcontentcontainer">
				

<div class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div class="div_my_zzk"><input value="" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
</div>
<div class="catListPostCategory">
<h3 class="catListTitle">随笔分类</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.cnblogs.com/Terrylee/category/48779.html">[01]&nbsp;&nbsp;.NET大本营(50)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to [01]&amp;nbsp;&amp;nbsp;.NET大本营(50)" href="http://www.cnblogs.com/Terrylee/category/48779.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_Link" href="http://www.cnblogs.com/Terrylee/category/161309.html">[02]&nbsp;&nbsp;探微知著CLR</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_RssLink" title="Subscribe to [02]&amp;nbsp;&amp;nbsp;探微知著CLR" href="http://www.cnblogs.com/Terrylee/category/161309.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_Link" href="http://www.cnblogs.com/Terrylee/category/78190.html">[03]&nbsp;&nbsp;银光点亮世界(62)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_RssLink" title="Subscribe to [03]&amp;nbsp;&amp;nbsp;银光点亮世界(62)" href="http://www.cnblogs.com/Terrylee/category/78190.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_Link" href="http://www.cnblogs.com/Terrylee/category/36734.html">[04]&nbsp;&nbsp;WCF后传(17)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_RssLink" title="Subscribe to [04]&amp;nbsp;&amp;nbsp;WCF后传(17)" href="http://www.cnblogs.com/Terrylee/category/36734.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_Link" href="http://www.cnblogs.com/Terrylee/category/36516.html">[05]&nbsp;&nbsp;架构与设计(24)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_RssLink" title="Subscribe to [05]&amp;nbsp;&amp;nbsp;架构与设计(24)" href="http://www.cnblogs.com/Terrylee/category/36516.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_Link" href="http://www.cnblogs.com/Terrylee/category/48778.html">[06]&nbsp;&nbsp;LINQ之美(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_RssLink" title="Subscribe to [06]&amp;nbsp;&amp;nbsp;LINQ之美(4)" href="http://www.cnblogs.com/Terrylee/category/48778.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_Link" href="http://www.cnblogs.com/Terrylee/category/115628.html">[07]&nbsp;&nbsp;AJAX风云(15)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_RssLink" title="Subscribe to [07]&amp;nbsp;&amp;nbsp;AJAX风云(15)" href="http://www.cnblogs.com/Terrylee/category/115628.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_Link" href="http://www.cnblogs.com/Terrylee/category/37512.html">[08]&nbsp;&nbsp;Web开发(66)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_RssLink" title="Subscribe to [08]&amp;nbsp;&amp;nbsp;Web开发(66)" href="http://www.cnblogs.com/Terrylee/category/37512.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_Link" href="http://www.cnblogs.com/Terrylee/category/124829.html">[09]&nbsp;&nbsp;依赖注入(14)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_RssLink" title="Subscribe to [09]&amp;nbsp;&amp;nbsp;依赖注入(14)" href="http://www.cnblogs.com/Terrylee/category/124829.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_Link" href="http://www.cnblogs.com/Terrylee/category/36514.html">[10]&nbsp;&nbsp;模式与实践(68)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_RssLink" title="Subscribe to [10]&amp;nbsp;&amp;nbsp;模式与实践(68)" href="http://www.cnblogs.com/Terrylee/category/36514.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_Link" href="http://www.cnblogs.com/Terrylee/category/48535.html">[11]&nbsp;&nbsp;数据持久(19)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_RssLink" title="Subscribe to [11]&amp;nbsp;&amp;nbsp;数据持久(19)" href="http://www.cnblogs.com/Terrylee/category/48535.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_Link" href="http://www.cnblogs.com/Terrylee/category/53293.html">[12]&nbsp;&nbsp;开源世界(35)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_RssLink" title="Subscribe to [12]&amp;nbsp;&amp;nbsp;开源世界(35)" href="http://www.cnblogs.com/Terrylee/category/53293.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_Link" href="http://www.cnblogs.com/Terrylee/category/44974.html">[13]&nbsp;&nbsp;代码生成(23)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_RssLink" title="Subscribe to [13]&amp;nbsp;&amp;nbsp;代码生成(23)" href="http://www.cnblogs.com/Terrylee/category/44974.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_Link" href="http://www.cnblogs.com/Terrylee/category/48958.html">[14]&nbsp;&nbsp;测试与重构(3)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_RssLink" title="Subscribe to [14]&amp;nbsp;&amp;nbsp;测试与重构(3)" href="http://www.cnblogs.com/Terrylee/category/48958.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_Link" href="http://www.cnblogs.com/Terrylee/category/124830.html">[15]&nbsp;&nbsp;工作流基础</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_RssLink" title="Subscribe to [15]&amp;nbsp;&amp;nbsp;工作流基础" href="http://www.cnblogs.com/Terrylee/category/124830.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl16_Link" href="http://www.cnblogs.com/Terrylee/category/162553.html">[16]&nbsp;&nbsp;技术曲苑杂坛(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl16_RssLink" title="Subscribe to [16]&amp;nbsp;&amp;nbsp;技术曲苑杂坛(1)" href="http://www.cnblogs.com/Terrylee/category/162553.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl17_Link" href="http://www.cnblogs.com/Terrylee/category/160783.html">[17]&nbsp;&nbsp;并行编程(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl17_RssLink" title="Subscribe to [17]&amp;nbsp;&amp;nbsp;并行编程(1)" href="http://www.cnblogs.com/Terrylee/category/160783.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl18_Link" href="http://www.cnblogs.com/Terrylee/category/58451.html">[18]&nbsp;&nbsp;动态语言(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl18_RssLink" title="Subscribe to [18]&amp;nbsp;&amp;nbsp;动态语言(4)" href="http://www.cnblogs.com/Terrylee/category/58451.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl19_Link" href="http://www.cnblogs.com/Terrylee/category/187123.html">[19] 写作生涯(2)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl19_RssLink" title="Subscribe to [19] 写作生涯(2)" href="http://www.cnblogs.com/Terrylee/category/187123.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl20_Link" href="http://www.cnblogs.com/Terrylee/category/36735.html">[20]&nbsp;&nbsp;推荐系列(32)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl20_RssLink" title="Subscribe to [20]&amp;nbsp;&amp;nbsp;推荐系列(32)" href="http://www.cnblogs.com/Terrylee/category/36735.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl21_Link" href="http://www.cnblogs.com/Terrylee/category/36515.html">[21]&nbsp;&nbsp;数据库相关(18)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl21_RssLink" title="Subscribe to [21]&amp;nbsp;&amp;nbsp;数据库相关(18)" href="http://www.cnblogs.com/Terrylee/category/36515.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl22_Link" href="http://www.cnblogs.com/Terrylee/category/43288.html">[30]&nbsp;&nbsp;前沿报道(28)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl22_RssLink" title="Subscribe to [30]&amp;nbsp;&amp;nbsp;前沿报道(28)" href="http://www.cnblogs.com/Terrylee/category/43288.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl23_Link" href="http://www.cnblogs.com/Terrylee/category/36511.html">[31]&nbsp;&nbsp;项目管理(3)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl23_RssLink" title="Subscribe to [31]&amp;nbsp;&amp;nbsp;项目管理(3)" href="http://www.cnblogs.com/Terrylee/category/36511.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl24_Link" href="http://www.cnblogs.com/Terrylee/category/148211.html">[32]&nbsp;&nbsp;我点我评(2)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl24_RssLink" title="Subscribe to [32]&amp;nbsp;&amp;nbsp;我点我评(2)" href="http://www.cnblogs.com/Terrylee/category/148211.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl25_Link" href="http://www.cnblogs.com/Terrylee/category/51852.html">[33]&nbsp;&nbsp;我思我考(13)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl25_RssLink" title="Subscribe to [33]&amp;nbsp;&amp;nbsp;我思我考(13)" href="http://www.cnblogs.com/Terrylee/category/51852.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl26_Link" href="http://www.cnblogs.com/Terrylee/category/51900.html">[34]&nbsp;&nbsp;社区活动(9)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl26_RssLink" title="Subscribe to [34]&amp;nbsp;&amp;nbsp;社区活动(9)" href="http://www.cnblogs.com/Terrylee/category/51900.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl27_Link" href="http://www.cnblogs.com/Terrylee/category/36507.html">[35]&nbsp;&nbsp;东拉西扯(37)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl27_RssLink" title="Subscribe to [35]&amp;nbsp;&amp;nbsp;东拉西扯(37)" href="http://www.cnblogs.com/Terrylee/category/36507.html/rss">(rss)</a></li>

</ul>

</div>

<div class="catListPostArchive">
<h3 class="catListTitle">随笔档案</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/08.html">2009年8月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/05.html">2009年5月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/04.html">2009年4月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_Link" href="http://www.cnblogs.com/Terrylee/archive/2009/01.html">2009年1月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl05_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/12.html">2008年12月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl06_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/11.html">2008年11月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl07_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/10.html">2008年10月 (12)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl08_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/09.html">2008年9月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl09_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/08.html">2008年8月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl10_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/07.html">2008年7月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl11_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/06.html">2008年6月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl12_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/03.html">2008年3月 (41)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl13_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/02.html">2008年2月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl14_Link" href="http://www.cnblogs.com/Terrylee/archive/2008/01.html">2008年1月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl15_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/12.html">2007年12月 (15)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl16_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/11.html">2007年11月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl17_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/07.html">2007年7月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl18_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/04.html">2007年4月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl19_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/03.html">2007年3月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl20_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/02.html">2007年2月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl21_Link" href="http://www.cnblogs.com/Terrylee/archive/2007/01.html">2007年1月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl22_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/12.html">2006年12月 (18)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl23_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/11.html">2006年11月 (32)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl24_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/10.html">2006年10月 (35)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl25_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/09.html">2006年9月 (19)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl26_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/08.html">2006年8月 (16)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl27_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/07.html">2006年7月 (23)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl28_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/06.html">2006年6月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl29_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/05.html">2006年5月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl30_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/04.html">2006年4月 (24)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl31_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/03.html">2006年3月 (17)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl32_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/02.html">2006年2月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl33_Link" href="http://www.cnblogs.com/Terrylee/archive/2006/01.html">2006年1月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl34_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/12.html">2005年12月 (38)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl35_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/11.html">2005年11月 (20)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl36_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/10.html">2005年10月 (27)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl37_Link" href="http://www.cnblogs.com/Terrylee/archive/2005/09.html">2005年9月 (10)</a> </li>

</ul>

</div>

<div class="catList">
<h3 class="catListTitle">个人站点</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_Link" href="http://terrylee.blog.51cto.com/" target="_top">TerryLee @ 51CTO</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_RssLink" title="Subscribe to TerryLee @ 51CTO" href="http://terrylee.blog.51cto.com/">(rss)</a></li>
<li style="margin-top: 2px;">我在51CTO的镜像</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_Link" href="http://weblogs.asp.net/TerryLee/" target="_top">TerryLee @ ASP.NET</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_RssLink" title="Subscribe to TerryLee @ ASP.NET" href="http://weblogs.asp.net/terrylee/rss.aspx">(rss)</a></li>
<li style="margin-top: 2px;">我在ASP.NET网站</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_Link" href="http://space.itpub.net/12184684/" target="_top">TerryLee @ IT168</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_RssLink" title="Subscribe to TerryLee @ IT168" href="http://space.itpub.net/12184684/action-rss-type-">(rss)</a></li>
<li style="margin-top: 2px;">我在IT168的镜像</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_Link" href="http://blog.joycode.com/terrylee/" target="_top">TerryLee @ 博客堂</a> <a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_RssLink" title="Subscribe to TerryLee @ 博客堂" href="http://blog.joycode.com/terrylee/Rss.aspx">(rss)</a></li>
<li style="margin-top: 2px;">我在博客堂的一片天地</li>
<li><a id="SingleColumn1_Categories_CatList_ctl02_LinkList_ctl05_Link" href="http://www.dotneteye.cn/" target="_top">个人主页</a> </li>

</ul>

</div>

<div class="catList">
<h3 class="catListTitle">我的好友</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl01_Link" href="http://chwkai.cnblogs.com/" target="_top">Aero</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl01_RssLink" title="Subscribe to Aero" href="http://chwkai.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl02_Link" href="http://anchky.cnblogs.com/" target="_top">anchky</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl02_RssLink" title="Subscribe to anchky" href="http://anchky.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl03_Link" href="http://www.cnblogs.com/anytao">Anytao</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl03_RssLink" title="Subscribe to Anytao" href="http://www.cnblogs.com/anytao/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl04_Link" href="http://www.cnblogs.com/autumoon" target="_top">Autumoon</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl04_RssLink" title="Subscribe to Autumoon" href="http://www.cnblogs.com/Autumoon/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl05_Link" href="http://www.cnblogs.com/renrenqq/" target="_top">DDL</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl05_RssLink" title="Subscribe to DDL" href="http://www.cnblogs.com/renrenqq/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl06_Link" href="http://dflying.cnblogs.com/" target="_top">Dflying Chen</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl06_RssLink" title="Subscribe to Dflying Chen" href="http://dflying.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl07_Link" href="http://dudu.cnblogs.com/" target="_top">Dudu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl07_RssLink" title="Subscribe to Dudu" href="http://dudu.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl08_Link" href="http://perhaps.cnblogs.com/" target="_top">Fantasy Soft</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl08_RssLink" title="Subscribe to Fantasy Soft" href="http://perhaps.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl09_Link" href="http://idior.cnblogs.com/" target="_top">idior</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl09_RssLink" title="Subscribe to idior" href="http://idior.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl10_Link" href="http://www.cnblogs.com/jessequ" target="_top">JesseQu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl10_RssLink" title="Subscribe to JesseQu" href="http://www.cnblogs.com/jessequ/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl11_Link" href="http://www.cnblogs.com/Jillzhang" target="_top">Jillzhang</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl11_RssLink" title="Subscribe to Jillzhang" href="http://www.cnblogs.com/jillzhang/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl12_Link" href="http://kid-li.cnblogs.com/" target="_top">kid-li</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl12_RssLink" title="Subscribe to kid-li" href="http://kid-li.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl13_Link" href="http://luking.cnblogs.com/" target="_top">luking</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl13_RssLink" title="Subscribe to luking" href="http://luking.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl14_Link" href="http://www.cnblogs.com/michellehu" target="_top">MichelleHu</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl14_RssLink" title="Subscribe to MichelleHu" href="http://www.cnblogs.com/michellehu/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl15_Link" href="http://blog.csdn.net/priderock" target="_top">PrideRock的专栏</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl15_RssLink" title="Subscribe to PrideRock的专栏" href="http://feeds.feedsky.com/csdn.net/PrideRock">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl16_Link" href="http://www.cnblogs.com/isuper/" target="_top">RogerTong </a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl16_RssLink" title="Subscribe to RogerTong " href="http://www.cnblogs.com/isuper/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl17_Link" href="http://www.cnblogs.com/Sunmoonfire" target="_top">Sunmoonfire</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl17_RssLink" title="Subscribe to Sunmoonfire" href="http://www.cnblogs.com/Sunmoonfire/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl18_Link" href="http://www.cnblogs.com/teddyma" target="_top">Teddy</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl18_RssLink" title="Subscribe to Teddy" href="http://www.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl19_Link" href="http://www.cnblogs.com/wayfarer" target="_top">wayfarer</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl19_RssLink" title="Subscribe to wayfarer" href="http://www.cnblogs.com/wayfarer/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl20_Link" href="http://hjf1223.cnblogs.com/" target="_top">阿不</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl20_RssLink" title="Subscribe to 阿不" href="http://hjf1223.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl21_Link" href="http://www.cnblogs.com/bvbook" target="_top">博文视点官方博客</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl21_RssLink" title="Subscribe to 博文视点官方博客" href="http://www.cnblogs.com/bvbook/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl22_Link" href="http://www.cnblogs.com/herohuo" target="_top">大人物中的小人物</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl22_RssLink" title="Subscribe to 大人物中的小人物" href="http://www.cnblogs.com/herohuo/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl23_Link" href="http://www.cnblogs.com/dingxue" target="_top">丁学</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl23_RssLink" title="Subscribe to 丁学" href="http://www.cnblogs.com/dingxue/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl24_Link" href="http://www.cnblogs.com/guaiguai/" target="_top">怪怪</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl24_RssLink" title="Subscribe to 怪怪" href="http://www.cnblogs.com/guaiguai/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl25_Link" href="http://www.cnblogs.com/callwangxiang" target="_top">蜡笔小巢</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl25_RssLink" title="Subscribe to 蜡笔小巢" href="http://www.cnblogs.com/callwangxiang/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl26_Link" href="http://www.cnblogs.com/waxdoll/" target="_top">蜡人张</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl26_RssLink" title="Subscribe to 蜡人张" href="http://waxdoll.cnblogs.com/Rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl27_Link" href="http://www.cnblogs.com/jeffreyzhao" target="_top">老赵</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl27_RssLink" title="Subscribe to 老赵" href="http://www.cnblogs.com/JeffreyZhao/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl28_Link" href="http://www.joygee.com/" target="_top">李茹</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl28_RssLink" title="Subscribe to 李茹" href="feed://http//www.joygee.com/feed/">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl29_Link" href="http://www.agilelabs.cn/blogs/linkin/default.aspx" target="_top">卢彦</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl29_RssLink" title="Subscribe to 卢彦" href="http://www.agilelabs.cn/blogs/linkin/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl30_Link" href="http://zhenyulu.cnblogs.com/" target="_top">吕震宇</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl30_RssLink" title="Subscribe to 吕震宇" href="http://zhenyulu.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl31_Link" href="http://www.cnblogs.com/lbq1221119" target="_top">罗炳桥</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl31_RssLink" title="Subscribe to 罗炳桥" href="http://www.cnblogs.com/lbq1221119/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl32_Link" href="http://lixianhuei.cnblogs.com/" target="_top">难得一蠢</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl32_RssLink" title="Subscribe to 难得一蠢" href="http://lixianhuei.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl33_Link" href="http://birdshome.cnblogs.com/" target="_top">鸟食轩</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl33_RssLink" title="Subscribe to 鸟食轩" href="http://birdshome.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl34_Link" href="http://bear-study-hard.cnblogs.com/" target="_top">努力学习的熊</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl34_RssLink" title="Subscribe to 努力学习的熊" href="http://bear-study-hard.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl35_Link" href="http://blog.donews.com/crabhn/" target="_top">螃蟹</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl35_RssLink" title="Subscribe to 螃蟹" href="http://blog.donews.com/crabhn/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl36_Link" href="http://crysta10203.blog.sohu.com/" target="_top">水晶心情</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl36_RssLink" title="Subscribe to 水晶心情" href="http://tb.sogou.com/rss?ch=it&amp;desc=%CB%D1%BA%FC%B2%A9%BF%CD%B6%A9%D4%C4&amp;url=http://crysta10203.blog.sohu.com/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl37_Link" href="http://xh831213.cnblogs.com/" target="_top">小寒</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl37_RssLink" title="Subscribe to 小寒" href="http://xh831213.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl38_Link" href="http://overred.cnblogs.com/" target="_top">雁儿飞飞</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl38_RssLink" title="Subscribe to 雁儿飞飞" href="http://overred.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl39_Link" href="http://www.cnblogs.com/justinyoung" target="_top">杨正祎</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl39_RssLink" title="Subscribe to 杨正祎" href="http://www.cnblogs.com/JustinYoung/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl40_Link" href="http://goodcandle.cnblogs.com/" target="_top">源码工作室</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl40_RssLink" title="Subscribe to 源码工作室" href="http://goodcandle.cnblogs.com/rss.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl41_Link" href="http://www.cnblogs.com/msdpe/" target="_top">张大磊</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl41_RssLink" title="Subscribe to 张大磊" href="http://www.cnblogs.com/msdpe/RSS.aspx">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl42_Link" href="http://www.cyworld.com.cn/qiansui" target="_top">张莹</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl43_Link" href="http://www.cnblogs.com/zhouyinhui" target="_top">周银辉</a> <a id="SingleColumn1_Categories_CatList_ctl03_LinkList_ctl43_RssLink" title="Subscribe to 周银辉" href="http://www.cnblogs.com/zhouyinhui/rss">(rss)</a></li>

</ul>

</div>



<div class="catListBlogRank">
<h3 class="catListTitle">积分与排名</h3>
<ul>
	<li class="liScore">
		积分 -	5250874
	</li><li class="liRank">
		排名 -	3
	</li>
</ul>
</div>



<div class="catListView">
<h3 class="catListTitle">阅读排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">1.&nbsp;.NET设计模式系列文章(240785)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/ASPNET_AJAX_QuickStarts.html">2.&nbsp;ASP.NET AJAX入门系列(162046)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/09/the-ultimate-jquery-plugin-list.html">3.&nbsp;强烈推荐：240多个jQuery插件(160249)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/21/Silverlight2-step-by-step-Tutorials.html">4.&nbsp;一步一步学Silverlight 2系列文章(94439)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/25/ASPNET_AJAX_ScriptManager.html">5.&nbsp;ASP.NET AJAX入门系列（2）：使用ScriptManager控件(88540)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl06_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/Enterprise_Library.html">6.&nbsp;Enterprise Library系列文章回顾与总结(87348)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl07_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/castl_ioc_article.html">7.&nbsp;Castle 开发系列文章(87221)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl08_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293509.html">8.&nbsp;.NET设计模式（2）：单件模式（Singleton Pattern）(85295)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl09_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/09/28/246050.html">9.&nbsp;今天下午真郁闷……(79632)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl10_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/13/295965.html">10.&nbsp;.NET设计模式（3）：抽象工厂模式（Abstract Factory）(73903)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl11_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/24/ASPNET_AJAX_Quick_Starts_Overview.html">11.&nbsp;ASP.NET AJAX入门系列（1）：概述(67798)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl12_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part1.html">12.&nbsp;一步一步学Silverlight 2系列（1）：创建一个基本的Silverlight应用(49550)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl13_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310716.html">13.&nbsp;.NET设计模式（5）：工厂方法模式（Factory Method）(47209)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl14_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/29/ASPNET_AJAX_UpdatePanel_Part1.html">14.&nbsp;ASP.NET AJAX入门系列（4）：使用UpdatePanel控件（一）(44878)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl15_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/03/365762.html">15.&nbsp;Castle ActiveRecord学习实践（1）：快速入门指南(44506)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl16_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293465.html">16.&nbsp;.NET设计模式（1）：开篇(36398)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl17_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/10/14/254631.html">17.&nbsp;Enterprise Library Step By Step系列（一）：配置应用程序块——入门篇(36023)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl18_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/19/299878.html">18.&nbsp;.NET设计模式（4）：建造者模式（Builder Pattern）(34152)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl19_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/28/306254.html">19.&nbsp;CodeSmith开发系列资料总结(30459)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl20_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/12/01/OpenSource_Framework_And_Resource_Recommendation_Overview.html">20.&nbsp;.NET开源项目介绍及资源推荐：序(30351)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl21_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part2.html">21.&nbsp;一步一步学Silverlight 2系列（2）：基本控件(29159)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl22_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/27/ASPNET_AJAX_ScriptManagerProxy.html">22.&nbsp;ASP.NET AJAX入门系列（3）：使用ScriptManagerProxy控件(28846)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl23_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/09/01/atlas_series_articles.html">23.&nbsp;Atlas学习手记系列(28339)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl24_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/23/Observer_Pattern.html">24.&nbsp;.NET设计模式（19）：观察者模式（Observer Pattern）(28231)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl02_TopList_ctl25_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/01/ASPNET_AJAX_UpdatePanle_Part2.html">25.&nbsp;ASP.NET AJAX入门系列（5）：使用UpdatePanel控件（二）(27899)</a>
			</li>
		
			</ul>
		
</div>

<div class="catListFeedback">
<h3 class="catListTitle">评论排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/10/13/253667.html">1.&nbsp;如何用SQLDMO在ASP.NET页面下实现数据库的备份与恢复(395)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/07/17/334911.html">2.&nbsp;.NET设计模式系列文章(355)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2009/01/05/LINQ-and-LINQ-to-SQL.html">3.&nbsp;不得不为LINQ说几句话，驳“LINQ已死”论(318)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/21/Silverlight2-step-by-step-Tutorials.html">4.&nbsp;一步一步学Silverlight 2系列文章(246)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310968.html">5.&nbsp;CodeSmith3.0开发资料下载(233)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl06_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/13/295965.html">6.&nbsp;.NET设计模式（3）：抽象工厂模式（Abstract Factory）(216)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl07_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/05/23/406688.html">7.&nbsp;新版设计模式手册[C#]下载(216)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl08_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/25/ASPNET_AJAX_ScriptManager.html">8.&nbsp;ASP.NET AJAX入门系列（2）：使用ScriptManager控件(179)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl09_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/09/the-ultimate-jquery-plugin-list.html">9.&nbsp;强烈推荐：240多个jQuery插件(168)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl10_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/11/12/ASPNET_AJAX_QuickStarts.html">10.&nbsp;ASP.NET AJAX入门系列(168)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl11_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/03/365762.html">11.&nbsp;Castle ActiveRecord学习实践（1）：快速入门指南(166)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl12_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/04/28/castl_ioc_article.html">12.&nbsp;Castle 开发系列文章(164)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl13_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/23/Observer_Pattern.html">13.&nbsp;.NET设计模式（19）：观察者模式（Observer Pattern）(162)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl14_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/08/01/Enterprise_Library.html">14.&nbsp;Enterprise Library系列文章回顾与总结(158)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl15_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/01/04/310716.html">15.&nbsp;.NET设计模式（5）：工厂方法模式（Factory Method）(158)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl16_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2005/12/09/293509.html">16.&nbsp;.NET设计模式（2）：单件模式（Singleton Pattern）(153)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl17_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/03/21/354972.html">17.&nbsp;天津.NET俱乐部成立了！(146)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl18_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2006/10/29/ASPNET_AJAX_UpdatePanel_Part1.html">18.&nbsp;ASP.NET AJAX入门系列（4）：使用UpdatePanel控件（一）(133)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl19_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2007/12/04/TemplateEngine-Smart-Code-Preview.html">19.&nbsp;基于模板引擎的代码生成器Smart Code预览(129)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl03_TopList_ctl20_Hyperlink1" href="http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part1.html">20.&nbsp;一步一步学Silverlight 2系列（1）：创建一个基本的Silverlight应用(125)</a>
			</li>
		
			</ul>
		
</div>

			</div>
			
		</div><!--end: sideBarMain -->
	</div><!--end: sideBar 侧边栏容器 -->
	<div class="clear"></div>
	</div><!--end: main -->
	<div class="clear"></div>
	<div id="footer">
		
<!--done-->
Copyright ©2010 TerryLee
	</div><!--end: footer -->
</div><!--end: home 自定义的最大容器 -->
    </form>
	
	
      
    
    
    
</body>
</html>
